ruler: Don't create two cairo_t's
authorBenjamin Otte <otte@redhat.com>
Wed, 1 Sep 2010 21:08:01 +0000 (23:08 +0200)
committerBenjamin Otte <otte@redhat.com>
Sun, 26 Sep 2010 13:11:34 +0000 (15:11 +0200)
gtk/gtkruler.c

index 4b82bb1e7b94f62aedf81504d435ba1088e6d649..72693f5e61da4832d6b027ebc42ae19124220af3 100644 (file)
@@ -899,13 +899,9 @@ gtk_ruler_real_draw_pos (GtkRuler *ruler)
 
          /*  If a backing store exists, restore the ruler  */
          if (priv->backing_store) {
-            cairo_t *cr = gdk_cairo_create (window);
-
             cairo_set_source_surface (cr, priv->backing_store, 0, 0);
             cairo_rectangle (cr, priv->xsrc, priv->ysrc, bs_width, bs_height);
             cairo_fill (cr);
-
-            cairo_destroy (cr);
           }
 
           if (priv->orientation == GTK_ORIENTATION_HORIZONTAL)